
package com.jf.cloud.api.feign;

import com.jf.cloud.api.dto.PurchaseOrderUpdateDTO;
import com.jf.cloud.api.vo.EsPageVO;
import com.jf.cloud.common.feign.FeignInsideAuthConfig;
import com.jf.cloud.common.order.dto.PurchaseOrderSearchDTO;
import com.jf.cloud.common.order.vo.EsPurchaseOrderVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 采购订单搜索
 * @author zz
 * @date 2021/02/05
 */
@FeignClient(value = "jfcloud-search",contextId = "searchPurchaseOrder")
public interface SearchPurchaseOrderFeignClient {

    /**
     * 分页获取采购订单信息
     * @param purchaseOrderSearchDTO
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/searchPurchaseOrder/pagePurchaseOrder")
    ServerResponseEntity<EsPageVO<EsPurchaseOrderVO>> pagePurchaseOrder(@RequestBody PurchaseOrderSearchDTO purchaseOrderSearchDTO);

    /**
     * 更新采购订单状态
     * @param purchaseOrder
     * @return
     */
    @PutMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/searchPurchaseOrder/updatePurchaseOrderStatus")
    ServerResponseEntity updatePurchaseOrderStatus(@RequestBody PurchaseOrderUpdateDTO purchaseOrder);
}
